<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>

<%@ include file="../init_include.jsp" %>
<%	
	String a=request.getParameter("catid");
	int catId;
	try
	{
		catId=Integer.parseInt(a);		
	}catch(NumberFormatException e)
	{
		out.println(e+"catId");
		dbi.closeAll();
		return;
	}
	int check_rst=Permission.accept(dbi,session,"sysop","tree",catId,"000010000"); 
	if (check_rst!=Permission.CHECK_RST_SUCCESS)
 	{
		dbi.closeAll();
		if (check_rst==Permission.CHECK_RST_DENY)
			response.sendRedirect("../deny.html");
		else
			response.sendRedirect("../index.jsp");
		return;
	}
	
	int classid=0;
	if(request.getParameter("classid")!=null)
		classid=Integer.parseInt(request.getParameter("classid"));
	String idtext=request.getParameter("idtext");
	Class_User.insertClassUser(dbi,classid,idtext);	
%>
	<%=Language.getNameByCode("sys.class.addsysop","Add user successfully!")%>
<script Language="JavaScript" src="../script/Ion_Show.js"></script> 
<script language="javascript">
	closewindow(2);
</script>	
<%@ include file="../init_free.jsp" %>
